﻿using NearAop;
using System;
using System.Collections.Generic;
using System.Net.Cache;
using System.Security;
using System.Text;

namespace CS
{

    [AddProxyInterface(typeof(Proxy4), typeof(IMyInterface1), typeof(IMyInterface2))]
    class T07_接口代理
    {
    }

    interface IMyInterface1
    {
        void ShowMsg1();
    }

    interface IMyInterface2
    {
        void ShowMsg2();
    }


    //代理类要求实现目标接口
    class Proxy4 : IMyInterface1, IMyInterface2
    {
        public void ShowMsg1()
        {
            Console.WriteLine("ShowMsg1");
        }

        public void ShowMsg2()
        {
            Console.WriteLine("ShowMsg2");
        }
    }
}
